home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
turbo_t1.arc
/
PROG9.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-06-05
|
556b
|
26 lines
PROGRAM PROG9;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: FOR statement
":n" to specify field width in Write
}
VAR
Low, High, Index : Integer;
BEGIN
Write('Enter a number (may be negative): ');
ReadLn(Low);
Write('Enter a larger number: ');
ReadLn(High);
WriteLn;
WriteLn('Ascending');
FOR Index := Low to High DO
WriteLn(Index:10);
WriteLn('Descending');
FOR Index := High DownTo Low DO
WriteLn(Index:6);
END.